﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using System.Xml;

namespace HBASite
{
    public partial class WebForm9 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            AdminLog.AdminLogSet(DateTime.Now.ToString(), AdminLog.CURR_USER, "Counter page visit");
        }

        protected void lbSetDownnumber_Click(object sender, EventArgs e)
        {
            string strAdminFile = @"c:\Counter.xml";
            string strRecordTag = "LogRecord";
            string strTimeTag = "Time";
            string strUserTag = "User";
            string strActionTag = "Action";

            // Create the XmlDocument.
            XmlDocument doc = new XmlDocument();
            int nCurrNumer = 0;
            bool bFileExist = true;
            if (System.IO.File.Exists(strAdminFile))
            {
                doc.Load(strAdminFile);
                nCurrNumer = int.Parse(doc.InnerText);
            }

            lblNumberDown.Text = nCurrNumer.ToString();
        }
    }
}
